gdk: Create surfaces directly, not from the source drawable
authorBenjamin Otte <otte@redhat.com>
Wed, 25 Aug 2010 21:35:40 +0000 (23:35 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 26 Sep 2010 13:11:11 +0000 (15:11 +0200)
The notion of a source drawable does not make a lot of sense for windows
that are not backed by a drawable, such as GdkOffscreenWindow after
converting it to cairo_surface_t.

gdk/gdkwindow.c

index 1b49d9ae1986551474e1c7173aa5a43e40bd9a2a..03e325bef99ced5e1883dc07318347fe88894200 100644 (file)
@@ -3843,16 +3843,13 @@ gdk_window_ref_cairo_surface (GdkDrawable *drawable)
       if (!private->cairo_surface)
        {
          int width, height;
-         GdkDrawable *source;
 
          /* It would be nice if we had some cairo support here so we
             could set the clip rect on the cairo surface */
          width = private->abs_x + private->width;
          height = private->abs_y + private->height;
 
-         source = _gdk_drawable_get_source_drawable (drawable);
-
-         private->cairo_surface = _gdk_drawable_create_cairo_surface (source, width, height);
+         private->cairo_surface = _gdk_drawable_create_cairo_surface (drawable, width, height);
 
          if (private->cairo_surface)
            {